java get current time in seconds

102

java get current time in seconds -

LocalDateTime date = LocalDateTime.now();
int seconds = date.toLocalTime().toSecondOfDay();

Comments

Submit
0 Comments